package com.chuangjiangx.member.common;

import org.springframework.web.util.DefaultUriTemplateHandler;

/**
 * @author cj-ch
 * @date 2018/5/21 下午6:02
 */
public class PageUrlConstant {



    public static final String LOGIN_PAGE = "/app/index.html?v={timestamp}#/login/{merchantId}";
    public static final String HOME_PAGE = "/app/index.html?v={timestamp}#/main/index?merchantId={merchantId}";
    public static final String RECHARGE_RULE = "/app/index.html?v={timestamp}#/rechargeRule?merchantId={merchantId}";
    public static final String POINT_LIST = "/app/index.html?v={timestamp}#/pointList?merchantId={merchantId}";
    public static final String MY_COUPON_PACKAGE = "/app/index.html?v={timestamp}#/myCouponPackage?merchantId={merchantId}";
    public static final String NEARBY_STORES = "/app/index.html?v={timestamp}#/main/nearbyStores?merchantId={merchantId}";
    public static final String STORE_LIST="/app/index.html?v={timestamp}#/storeList?merchantId={merchantId}";

    public static final String C_TO_B_PAGE="/app/index.html?v={timestamp}#/payment/ctob?merchantId={merchantId}";

    public static final String page(String uriTemplate,Long merchantId){
        DefaultUriTemplateHandler handler = new DefaultUriTemplateHandler();
        return handler.expand(uriTemplate,System.currentTimeMillis(),merchantId).toString();
    }

}
